###################################################################################
# Read File Into Vector
snippet rdfile
	std::vector<char> v;
	if (FILE *${2:fp} = fopen("${1:filename}", "r")) {
		char buf[1024];
		while (size_t len = fread(buf, 1, sizeof(buf), $2))
			v.insert(v.end(), buf, buf + len);
		fclose($2);
	}${3}
# std::map
snippet map
	std::map<${1:key}, ${2:value}> map${3};
# std::vector
snippet vector
	std::vector<${1:char}> vec${2};
# std::array
snippet array
	std::array<${1:char}, ${2:num}> array${3};
snippet deque
	std::deque<> deque${};
snippet list
	std::list<> list${};
# Namespace
snippet ns
	namespace ${1:`Filename('', 'my')`} {
		${2}
	} /* $1 */
# Class
snippet cl
	class ${1:`Filename('$1_t', 'name')`} {
	public:
		$1 (${2:arguments});
		virtual ~$1 ();
	
	private:
		${3:/* data */}
	};
# Error
snippet try
	try {
		${1:/*code*/}
	} catch( ${2:/*ExceptionName*/}) {
		  ${3:/*code for ExceptionName*/}
	}
# template
snippet tmp
	template <class T>
	void ${1:funcName}(T &${2:var1}, T &${3:var2}) {
		${4:/* code */}
	}

